package com.yami.shop.webservice.common.dao;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yami.shop.bean.model.TransferTokenRecord;
import com.yami.shop.common.util.PageParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Mapper接口
 *
 * @author zhangchaoqun
 * @date 2021-10-21
 */
public interface TransferTokenRecordMapper
{
    /**
     * 查询
     * @param transferTokenRecord
     */
    public void save(@Param("transferTokenRecord") TransferTokenRecord transferTokenRecord);
    void saveBatch(@Param("list") List<TransferTokenRecord> list);
    public void updateByPrimaryKeySelective(@Param("transferTokenRecord") TransferTokenRecord transferTokenRecord);
    public TransferTokenRecord selectByTokenId(@Param("tokenId") String tokenId,@Param("type") Integer type);
    public List<TransferTokenRecord> selectListByTokenId(@Param("tokenIds") List<String> tokenIds,@Param("type") Integer type);
    /**
     * 批量修改
     *
     * @param 信息
     */
    void updateBatch(@Param("list") List<TransferTokenRecord> list);
    void updateBatchByBatchIdAndStatus(@Param("batchIds") List<Long> batchIds,@Param("status") Integer status);
    void deteleBatchByBatchIds(@Param("batchIds") List<Long> batchIds);
    public List<TransferTokenRecord> selectListByBatchId(@Param("batchId") Long batchId);

    /**
     *  分页查询划转记录数据
     *
     * @param page
     * @param param
     * @return
     */
    IPage<TransferTokenRecord> getPage(@Param("page") PageParam<TransferTokenRecord> page, @Param("param") TransferTokenRecord param);

    /**
     *  分页查询划转汇总数据
     *
     * @param page
     * @param param
     * @return
     */
    IPage<TransferTokenRecord> getCollectPage(@Param("page") PageParam<TransferTokenRecord> page, @Param("param") TransferTokenRecord param);
}
